package com.sinosoft.sm.system.resource.manager;

import java.util.List;

import com.sinosoft.sm.system.resource.dao.ResourceEntityMapper;
import com.sinosoft.sm.system.resource.entity.ResourceEntity;
import com.sinosoft.sm.system.resource.manager.api.ResourceManager;

/**
 * 资源管理实现类
 * @author leichao
 *
 */
public class ResourceManagerImpl implements ResourceManager{

	private ResourceEntityMapper resourceEntityMapper;
	
	public void setResourceEntityMapper(ResourceEntityMapper resourceEntityMapper) {
		this.resourceEntityMapper = resourceEntityMapper;
	}

	/**
	 * 根据角色id获取相应的资源信
	 */
	public List<ResourceEntity> getPermissionsByRoles(String[] roleIds) {
		return resourceEntityMapper.getPermissionsByRoles(roleIds);
	}

	/**
	 * 根据角色id获取相应的资源信
	 */
	public List<ResourceEntity> getResourceByRoleId(String roleid) {
		// TODO Auto-generated method stub
		return resourceEntityMapper.getResourceByRoleId(roleid);
	}

	
}
